﻿using System;
using System.Collections.Generic;
using System.Text;
using Slippor.Common.PluginFramework;
using Slippor.Douban.Radio.Assist;
using RestoreHandlerPlugin.Properties;

namespace RestoreHandlerPlugin
{
    public class RestoreConfig : IConfig
    {
        public  static SettingManager SettingManager = new SettingManager(new Settings()); 

        #region IConfig Members

        ConfigForm _configForm;
        public bool Config(ref IPlugin plugin, out object config)
        {
            config = String.Empty;
            if (_configForm != null && !_configForm.IsDisposed)
            {
                _configForm.Close();
            }
            _configForm = new ConfigForm(this);
            _configForm.ShowDialog();
            return false;
        }

        public void Update(ref IPlugin plugin, ref object config)
        {
            ;
        }

        public void Reset(ref IPlugin plugin)
        {
            SettingManager.Settings.Reset();
        }

        #endregion
    }
}
